package com.github.io.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.github.io.utils.TreeModel;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @author liry
 * @version 1.0
 * @date Created on 2022/9/13 17:06
 * Description: 接口返回值 字段数据说明
 */

@Data
@Accessors(chain = true)
@TableName("sb_api_result_explanation_data")
public class SbApiResultExplanationData extends BaseEntity implements TreeModel<SbApiResultExplanationData> {
    
    @TableId(type = IdType.ASSIGN_ID)
    private String id;
    
    @TableField
    private String pid;
    
    // 接口id
    @TableField("api_id")
    private String apiId;
    
    // 参数名称
    @TableField("param_name")
    private String paramName;
    
    
    // 变量参数
    @TableField(value = "variable_value")
    private String variableValue;
    
    // 数据类型: List、Int、Long、Object
    @TableField("param_type")
    private Object paramType;
    
    // 字段说明
    @TableField
    private String description;

    @TableField(exist = false)
    private List<SbApiResultExplanationData> children;

    @Override
    public SbApiResultExplanationData setChildren(List<SbApiResultExplanationData> children) {
        this.children = children;
        return this;
    }
}
